package cs4;

public class Student {
	public String name;
	public String sex;
	public int age;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	@Override
	public String toString() {
		return "Student [name=" + name + ", sex=" + sex + ", age=" + age + "]";
	}
	public boolean equals(Object obj){
		if(obj instanceof Student){
			Student s=(Student) obj;
			if(s.getName().equalsIgnoreCase(this.name)&&s.getAge()==this.age){
				return true;
			}
		}
		return false;
	}
	

}
